home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / swtools / trubasic / rolldemos / demos / sci / lsquare.tru < prev    next >
Encoding:
Text File  |  1994-08-02  |  1.3 KB  |  22 lines

  1. !
  2. !  LSQUARE.  Add a least-squares line to data points.
  3. !  Data taken from "The Shortwave Propagation Handbook" (2nd ed)
  4. !  by George Jacobs and Theodore J. Cohen.  Page 111.
  5. !
  6. LIBRARY "sglib.trc"
  7. DIM x(120),y(120)
  8. MAT READ x,y
  9.  
  10. CALL tw_wset_title(0,"lsquare")
  11.  
  12. CALL SetYscale(70,170)
  13.  
  14. CALL SetText("Sunspots vs. Solar Flux","Daily Sunspot Number","Daily Solar Flux")
  15. CALL DataGraph(x,y,6,0,"red green yellow")
  16. CALL AddLSgraph(x,y,1,"red")
  17. get point tmp,tmp2
  18.  
  19. DATA 16,17,5,4,18,19,21,24,22,25,28,30,32,33,31,35,21,25,26,30,28,31,37,37,39,38,34,25,40,41,43,44,42,45,47,48,50,50,52,56,57,59,46,42,41,45,48,52,44,45,49,55,58,59,53,55,55,59,57,65,64,61,63,64,66,65,67,69,71,76,75,81,80,80,81,82,87,90,84,84,64,65,78,78,73,80,77,74,70,70,61,63,73,74,73,77,79,78,79,63,81,94,97,93,93,86,79,98,93,116,116,115,116,104,127,125,130,131,123,139
  20. DATA 81,84,84,88,89,87,90,89,87,87,85,82,91,90,87,85,96,95,95,99,93,94,95,98,96,103,105,111,100,94,99,97,97,94,97,98,100,95,97,102,104,104,104,105,107,109,108,108,112,115,115,115,116,117,120,119,127,125,133,103,106,110,108,111,108,107,108,107,108,105,110,102,107,108,108,106,110,114,118,119,116,115,119,118,116,114,115,114,121,122,126,127,125,128,131,126,127,131,130,133,131,129,131,123,135,138,140,144,146,148,158,157,156,157,154,159,159,163,162,166
  21. END
  22.